package com.ybf.api.builder;

import com.ybf.api.utils.Utils;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.context.Context;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.util.*;
import java.util.stream.Collectors;

public class Start {
    public static void main(String[] args) {

        List<GenerateFile> generateFileList = new ArrayList<>();

//        generateFileList.add(new GenerateFile(
//                "permissions",
//                "Permissions"
//        ));
//        generateFileList.add(new GenerateFile(
//                "role_permissions",
//                "RolePermissions"
//        ));
//        generateFileList.add(new GenerateFile(
//                "user_roles",
//                "UserRoles"
//        ));

        generateFileList.add(new GenerateFile(
                "file_list",
                "FileDetails"
        ));

        CodeGenerator codeGenerator = new CodeGenerator(generateFileList);
        codeGenerator.start();
    }
}
